-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Add missing ZPP checks #4878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing ZPP checks #4878
Conversation
6eaef4a
to
7be77a9
Compare
ext/mysqli/tests/mysqli_report.phpt
Outdated
mysqli_thread_safe($link); | ||
} catch (ArgumentCountError $exception) { | ||
print($exception->getMessage() . "\n"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just drop this part.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're going to disallow passing a mysqli
instance to mysqli_thread_safe()
, we should also mark the associtated mysqli::thread_safe()
as static. Same for mysqli::get_client_info()
. See also https://bugs.php.net/78790.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cmb69 Thank you for your help on the issue. Does it need any discussion in order to declare them static or can I go ahead and create a PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be discussed, at least. After all, even the documentation states that mysqli_get_client_info()
is supposed to be called with a mysqli
argument, so this might be quite some BC break. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's documented, let's go with what the docs say it should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem: if we enforce the mysqli parameter, likely some code which doesn't pass would break. Also docs are inconsistent regarding mysqli_get_client_info()
and mysqli_thread_safe()
(the latter is parameterless). This is rather messy :(
8d86925
to
553b4f8
Compare
No description provided.